package com.niguang.work.api.enums;

import com.niguang.work.api.constant.ApiDicConstants;
import lombok.Getter;

@Getter
public enum ZhengGaiTitleEnum {

    OW_TI_JIAO_KEY(ApiDicConstants.ZhengGaiTitle.OW_TI_JIAO_KEY, 1, "我上报的", "http://file.gzhuijiangyuan.com/file/51,32248b18827e"),

    JI_FEN_JIANG_LI_KEY(ApiDicConstants.ZhengGaiTitle.JI_FEN_JIANG_LI_KEY, 2, "积分奖励", "http://file.gzhuijiangyuan.com/file/53,2b512424da6e"),

    SHANG_BAO_YIN_HUAN_KEY(ApiDicConstants.ZhengGaiTitle.SHANG_BAO_YIN_HUAN_KEY, 3, "上报隐患", "http://file.gzhuijiangyuan.com/file/54,2b504602e1f3"),

    QUAN_BU_ZHENG_GAI_KEY(ApiDicConstants.ZhengGaiTitle.QUAN_BU_ZHENG_GAI_KEY, 4, "全部整改", "http://file.gzhuijiangyuan.com/file/50,32239c25cc2a"),

    DAI_WO_ZHENG_GAI_KEY(ApiDicConstants.ZhengGaiTitle.DAI_WO_ZHENG_GAI_KEY, 5, "待我整改", "http://file.gzhuijiangyuan.com/file/53,3221a4845329"),

    DAI_WO_FU_CHA_KEY(ApiDicConstants.ZhengGaiTitle.DAI_WO_FU_CHA_KEY, 6, "待我复查", "http://file.gzhuijiangyuan.com/file/56,321fb3e6b14e"),

    QUAN_BU_YIN_HUAN_KEY(ApiDicConstants.ZhengGaiTitle.QUAN_BU_YIN_HUAN_KEY, 7, "全部隐患", "http://file.gzhuijiangyuan.com/file/55,3222bd8238ad"),

    DAI_WO_SHEN_HE_KEY(ApiDicConstants.ZhengGaiTitle.DAI_WO_SHEN_HE_KEY, 8, "待我审核", "http://file.gzhuijiangyuan.com/file/52,322011e33948");

    private String key;

    private Integer pageIndex;

    private String title;

    private String iconUrl;

    ZhengGaiTitleEnum(String key, Integer pageIndex, String title, String iconUrl) {
        this.key = key;
        this.pageIndex = pageIndex;
        this.title = title;
        this.iconUrl = iconUrl;
    }


    public static String getTitle(String key) {
        for (ZhengGaiTitleEnum c : ZhengGaiTitleEnum.values()) {
            if (c.key.equals(key)) {
                return c.title;
            }
        }
        return "";
    }


    public static Integer getPageIndex(String key) {
        for (ZhengGaiTitleEnum c : ZhengGaiTitleEnum.values()) {
            if (c.key.equals(key)) {
                return c.pageIndex;
            }
        }
        return 0;
    }

    public static String getIconUrl(String key) {
        for (ZhengGaiTitleEnum c : ZhengGaiTitleEnum.values()) {
            if (c.key.equals(key)) {
                return c.iconUrl;
            }
        }
        return "";
    }

}
